/***************************************************************************
 *   Copyright (C) 2009 by Bernhard Neuhofer   *
 *   mail@bneu.at   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/


#include "AbstractLp.h"
#include "message.h"
#include "modelentity.h"
#include "abstractAdapter.h"
#include "smOutput.h"
#include <iostream>
#include "../tools/log.h"

using namespace std;






/**
 * Returns the Id of the LP
 * @return int
 */
unsigned int AbstractLp::getId()
{
    return _id;
}

/**
 * Sets the associated adapter.
 * @param assocAd The associated adapter
 */
void AbstractLp::setAssocAd(AbstractAdapter* assocAd)
{
    _assocAd=assocAd;
}

/**
 * Sets the associated model entity
 * @param assocMe The associated model entity
 */
void AbstractLp::setAssocMe(ModelEntity *assocMe)
{
    _assocMe=assocMe;
}

/**
 * Sets the GvtStats
 * @param gvtStats The GvtStats object
 */
void AbstractLp::setGvtStats(GvtStats* gvtStats)
{
    FILE_LOG(logINFO)<<"setting gvtstats"<<endl;
    _gvtStats=gvtStats;
    cout<<_gvtStats->getColor()<<endl;
}

/**
 * Sets the associated message handler
 * @param assocMh The associated message Handler
 */
void AbstractLp::setAssocMh(MessageHandler* assocMh)
{
    _assocMh=assocMh;
}

/**
 * Returns the associated adapter
 * @return AbstractAdapter
 */
AbstractAdapter* AbstractLp::getAssocAd()
{
    return _assocAd;
}

/**
 * Returns the associated model entity
 * @return ModelEntity
 */
ModelEntity * AbstractLp::getAssocMe()
{
    return _assocMe;
}

/**
 * Returns the associated message handler
 * @return MessageHandler
 */
MessageHandler* AbstractLp::getAssocMh()
{
    return _assocMh;
}

/**
 * Returns the SmOutput Object
 * @return SmOutput
 */
SmOutput* AbstractLp::getSmOutput()
{
    return _smOutput;
}

/**
 * Returns the GvtStats object
 * @return GvtStats
 */
GvtStats* AbstractLp::getGvtStats()
{
    return _gvtStats;
}

/**
 * Get the current stepStats
 * @return GvtStats
 */
GvtStats* AbstractLp::getStepStats()
{
    return _stepStats;
}

/**
 * Set the smOutput.
 * @param smOutput Set the smOutput object
 */
void AbstractLp::setSmOutput(SmOutput* smOutput)
{
    FILE_LOG(logINFO)<<"*** setting smoutput"<<endl;
    _smOutput=smOutput;
}

/**
 * Set the stepStats.
 * @param stepStats Set the stepStat object
 */
void AbstractLp::setStepStats(GvtStats* stepStats)
{
    FILE_LOG(logINFO)<<"Setting stepstats";
    _stepStats=stepStats;
}

